package designPatterns.P04_建造者模式_Builder.第2版_使用建造者;

import designPatterns.P04_建造者模式_Builder.第2版_使用建造者.builders.HouseBuilder;

/**
 * @author d11yu
 */
public class HouseDirector {
    private HouseBuilder builder;

    public HouseBuilder getBuilder() {
        return builder;
    }

    public void setBuilder(HouseBuilder builder) {
        this.builder = builder;
    }

    public HouseDirector(HouseBuilder builder) {
        this.builder = builder;
    }

    public HouseDirector() {
    }

    public House build() {
        builder.buildBase();
        builder.buildWalls();
        builder.buildRoof();
        return builder.build();
    }
}
